from enum import Enum


class WidgetType(Enum):
    # 等待
    WAIT = 'wait'

    # 等待到
    WAIT_TEXT = 'wait_text'  # 等待到出现文字
    WAIT_PIC = 'wait_pic'  # 等待到出现图片

    # 单击
    CLICK_POS = 'click_pos'  # 位置
    CLICK_TEXT = 'click_text'  # 文字
    CLICK_PIC = 'click_pic'  # 图片

    # 双击
    DOUBLE_CLICK_POS = 'double_pos'  # 位置
    DOUBLE_CLICK_TEXT = 'double_text'  # 文字
    DOUBLE_CLICK_PIC = 'double_pic'  # 图片

    # 长按
    LONG_PRESS_POS = 'long_press_pos'  # 位置
    LONG_PRESS_TEXT = 'long_press_text'  # 文字
    LONG_PRESS_PIC = 'long_press_pic'  # 图片

    DRAG = 'drag'   # 拖拽

    # 输入
    INPUT_TEXT = 'input_text'   # 输入文字
    INPUT_KEYBOARD = 'input_keyboard'   # 键盘输入

    # 变量
    VARIABLE_SET = 'variable_set'  # 设置

    # 调用脚本
    CALL_SCRIPT = 'call_script'

    # if
    IF = 'if'

    # for
    FOR = 'for'
    CONTINUE = 'continue'

    # while
    WHILE = 'while'

    BREAK = 'break'

    @staticmethod
    def values():
        result = []
        for widgetType in WidgetType:
            result.append(widgetType.value)

        return result
